package datatypes.film;

public class filmRole {

	private String id;
	private String actor;
	private String film;
	private String character;

	public filmRole(String id, String actor, String film, String character) {
		this.id = id;
		this.actor = actor;
		this.film = film;
		this.character = character;
	}

	public void init(filmRole film_role) {
		this.id = film_role.getId();
		this.actor = film_role.getActor();
		this.film = film_role.getFilm();
		this.character = film_role.getCharacter();
	}

	public filmRole() {
		this.id = null;
		this.actor = null;
		this.film = null;
		this.character = null;
	}

	public String getFilm() {
		return film;
	}

	public void setFilm(String film) {
		this.film = film;
	}

	public String getActor() {
		return actor;
	}

	public void setActor(String actor) {
		this.actor = actor;
	}

	public String getCharacter() {
		return character;
	}

	public void setCharacter(String character) {
		this.character = character;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		if (id != null && id.length() > 0)
			sb.append("film role id: " + id + "\n");

		if (film != null && film.length() > 0)
			sb.append("film name: " + film + "\n");

		if (actor != null && actor.length() > 0)
			sb.append("actor: " + actor + "\n");

		if (character != null && character.length() > 0)
			sb.append("character: " + character + "\n");

		return sb.toString();
	}

}
